package com.kylin.commodity.api.dto.req;

import com.kylin.artwork.api.dto.req.PageableReqDTO;
import com.kylin.shared.enums.ApprovalState;
import com.kylin.shared.enums.MarketingType;
import com.kylin.shared.enums.YesNoEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Min;

/**
 * 查询商品请求，请求结果为商品数据列表（可分页）
 * @author Damon S.
 * @version v1.0.1
 * @date 2019年11月05日 15:16
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "查询商品请求参数")
public final class QueryCommodityReqDTO extends PageableReqDTO {

    @ApiModelProperty(value = "商品名称")
    private String  name;

    @ApiModelProperty(value = "商品编码")
    private String commodityCode;

    @Min(value = 0, message = "商品价格不能为负")
    @ApiModelProperty(value = "商品价格（分）")
    private Integer price;

    @ApiModelProperty(value = "商家ID")
    private Long    merchantId;

    @ApiModelProperty(value = "审核状态")
    private ApprovalState approvalState;

    @ApiModelProperty(value = "是否上架")
    private YesNoEnum shelved;

    @ApiModelProperty(value = "是否删除")
    private YesNoEnum removed;

    @ApiModelProperty(value = "营销类型")
    private MarketingType marketingType;
}
